package cn.vehicle.controller;

import cn.vehicle.biz.SysUserBiz;
import cn.vehicle.domains.vo.Result;
import cn.vehicle.domains.vo.sysUser.AddUserReq;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/user")
@Slf4j
@Tag(name = "SysUserController", description = "用户管理相关接口")
public class SysUserController {

    @Resource
    private SysUserBiz sysUserBiz;
    @RequestMapping("/add")
    @Operation(description = "创建用户接口")
    public Result<Void> addUser(@RequestBody @Valid AddUserReq req) {
        sysUserBiz.addUser(req);
        return Result.success();
    }
}
